<%@ Page Language="C#" MasterPageFile="app-frame.master" AutoEventWireup="true" CodeFile="ReportWizard_New.aspx.cs"
    Inherits="ReportWizard" Title="ReportWizard" EnableEventValidation="false" %>


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
          
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">        
    
    <script language="JavaScript" type="text/javascript" src="scripts/ReportDesigner.js"></script>
      
    <asp:Label ID="lblerrmsg" runat="server" Text="" CssClass="controlFont"></asp:Label>
    <asp:Wizard ID="wz_Report" runat="server" Height="100%" Width="99%" OnFinishButtonClick="wizReport_FinishButtonClick"
        ActiveStepIndex="0" OnActiveStepChanged="wz_Report_ActiveStepChanged" OnCancelButtonClick="wz_Report_CancelButtonClick"
        OnNextButtonClick="wz_Report_NextButtonClick" OnPreviousButtonClick="wz_Report_PreviousButtonClick" 
        CssClass="defaultFont" Font-Size="8pt" DisplayCancelButton="True" HeaderText="Report Wizard - Add">
        <WizardSteps>
            <asp:WizardStep runat="server" Title="Choose Source" StepType="Start"><table style="width: 100%" border="0">
                <tr>
                    <td style="height: 19px; width: 2px;">
                    </td>
                    <td style="height: 19px;">
                        <asp:Label ID="lblChooseSource" runat="server" Font-Bold="True" CssClass="defaultFont" Font-Size="10pt"
                            Text="&nbsp;Step 1: Choose source"></asp:Label>
                    </td>
                    <td style="height: 19px">
                        <asp:Label ID="lblReportId" runat="server" Visible="False"></asp:Label>
                        <asp:Label ID="lblReportSrc" runat="server" Text="Report source" Visible="False"></asp:Label>
                        &nbsp;
                    </td>
                </tr>
            </table>
                <table style="width: 100%">
                    <tr>
                        <td style="width: 2px; height: 46px;">
                        </td>
                        <td style="height: 46px">
                            <table>
                                <tr>
                                    <td style="height: 22px;">
                                        <asp:Label ID="lbl_Object1" runat="server" CssClass="controlLabelFont" ForeColor="Black"
                                            Text="Source Table/Query"></asp:Label>
                                    </td>
                                    <td style="height: 22px">
                                        <asp:DropDownList ID="cmbObjects" runat="server" CssClass="defaultFont" Font-Size="8pt"
                                            Width="250px" AutoPostBack="True" OnSelectedIndexChanged="cmbObject_SelectedIndexChanged"
                                            CausesValidation="True">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 22px;">
                                        <asp:HyperLink ID="hlCreateQuery" runat="server" Font-Size="X-Small" NavigateUrl="ReportSQL.aspx?pgs_id=fa94b4929612d0bb&amp;mn=87e59d3b11c59ebb" Visible="False">Create Query</asp:HyperLink>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="width: 14px; height: 46px;">
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 164px; width: 2px;">
                        </td>
                        <td style="height: 164px" >
                            <table>
                                <tr>
                                    <td align="left" style="height: 20px">
                                        <asp:Label ID="Label61" runat="server" CssClass="controlLabelFont" ForeColor="Black"
                                            Text="Choose the fields"></asp:Label>
                                    </td>
                                    <td style="width: 42px; height: 20px">
                                    </td>
                                    <td style="height: 20px">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="height: 149px">
                                        <asp:ListBox ID="lstFields1" runat="server" Height="153px" Width="245px" Font-Size="8pt" SelectionMode="Multiple">
                                        </asp:ListBox>
                                    </td>
                                    <td align="center" valign="middle" style="height: 149px; width: 42px;">
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:ImageButton ID="imgSelect1" runat="server" ImageUrl="Images/front.gif" OnClick="imgSelect_Click" OnClientClick="javascript:return validateSelFields();" 
                                                        AlternateText="Select field" ToolTip="Select field" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:ImageButton ID="imgSelectAll1" runat="server" ImageUrl="Images/last.gif" OnClick="imgSelectAll_Click" OnClientClick="javascript:return validateSelFields();"
                                                        AlternateText="Select all fields" ToolTip="Select all fields" />
                                                </td>
                                            </tr>
                                            <tr>
                                            <td style ="height: 15px">
                                            </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 25px">
                                                    <asp:ImageButton ID="imgUnselect1" runat="server" ImageUrl="Images/back.gif" OnClick="imgUnselect_Click" OnClientClick="javascript:return validateSelFields();"
                                                        AlternateText="Deselect field" ToolTip="Deselect field" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:ImageButton ID="imgUnselectAll1" runat="server" ImageUrl="Images/first.gif" OnClick="imgUnselectAll_Click" OnClientClick="javascript:return validateSelFields();"
                                                        AlternateText="Deselect all fields" ToolTip="Deselect all fields" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td align="left" style="height: 149px">
                                        <asp:ListBox ID="lstSelectedFields1" runat="server" Height="153px" Width="245px" Font-Size="8pt" SelectionMode="Multiple"></asp:ListBox>
                                    </td>
                                    <td align="left" style="height: 149px">
                                        <table>
                                            <tr>
                                                <td style="width: 3px">
                                                    <asp:ImageButton ID="imgUp1" runat="server" ImageUrl="Images/up.gif" OnClick="imgUp_Click"
                                                        AlternateText="Move up" ToolTip="Move up" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 3px">
                                                    <asp:ImageButton ID="imgDown1" runat="server" ImageUrl="Images/down.gif" OnClick="imgDown_Click"
                                                        AlternateText="Move down" ToolTip="Move down" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        <asp:Label ID="lblFieldsMsg1" runat="server" CssClass="defaultFont" Font-Size="8pt" ForeColor="Red"></asp:Label>
                            </td>
                    </tr>
                    <tr>
                        <td style="width: 2px; height: 7px;">
                        </td>
                        <td style="width: 44px; height: 7px;">
                            <asp:HiddenField ID="hiddenTmp" runat="server" /><asp:HiddenField ID="hiddenParam" runat="server" />
                        </td>
                        <td style="width: 14px; height: 7px;">
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="Field Properties">
                <table style="width: 100%" border="0">
                    <tr style="width: 50px">
                    <td style="width: 1px"></td>
                        <td>
                            <asp:Label ID="Label15" runat="server" Font-Bold="True" CssClass="defaultFont" Font-Size="10pt"
                                Text="Step 2: Caption Details for the Selected Fields"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table style="width: 100%; height: auto" runat="server">
                    <tr runat="server">
                        <td style="width: 1px"></td>
                        <td style="width: auto; height: 20px;" runat="server">
                            <asp:Label ID="lblMessage" runat="server" Font-Bold="False" CssClass="defaultFont" Font-Size="8pt"
                                ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td style="width: 1px"></td>
                        <td style="width: auto" id="td_Field" runat="server">
                            <table style="width: 100%; height: 100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="width: 1px"></td>                             
                                    <td style="width: 100%; height: 61px;" valign="top">
                                        <table id="tblProperties" border="0" cellpadding="0" cellspacing="0"
                                            runat="server">
                                            <tr runat="server" style="height: 25px" class="Grid_Header">
                                                <td align="left" runat="server" style="height: 25px;" class="Grid_Header">
                                                    <asp:Label ID="lblCaption" runat="server" Text="Caption"
                                                        Font-Bold="True" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                                                </td>
                                                <td align="left" runat="server" style="height: 25px;">
                                                    <asp:Label ID="lblCapOver" runat="server" Text="Caption Override"
                                                        Font-Bold="True" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                                                </td>
                                                <td align="left" runat="server" style="width: 43px;">
                                                    <asp:Label ID="lblBold" runat="server" CssClass="controlLabelFont" Font-Bold="True"
                                                        Font-Size="8pt" Text="Bold"></asp:Label>
                                                    </td>
                                                <td runat="server" align="left" style="width: 67px;">
                                                    <asp:Label ID="lblWordWrap" runat="server" Font-Bold="True" Font-Size="8pt" Text="Word Wrap"></asp:Label>
                                                </td>
                                                <td runat="server" align="left" style="height: 25px; width: 5px;">
                                                    &nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep1" runat="server" Title="Source Filter">
                <table style="width: 100%" border="0">
                <tr></tr>
                    <tr style="width: 50px">
                    <td style="width: 1px"></td>
                        <td>
                            <asp:Label ID="lblSourceFilter" runat="server" Font-Bold="True" CssClass="defaultFont" Font-Size="10pt"
                                Text="Step 3: Source Filter"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table style="width: 100%;" border="0">
                    <tr>
                        <td id="Td4" style="width: auto; height: 20px;" runat="server">
                            <asp:Label ID="lblSrcFilMsg" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table cellpadding="3" border="0" cellspacing="0">
                    <tr style="height: 25px" class="Grid_Header">
                        <td style="width: 150px; height: 21px;">
                            <asp:Label ID="lblColumn_Name" runat="server" Text="Column Name" ForeColor="Black" Font-Bold="True" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <td style="width: 150px; height: 21px;">
                            <asp:Label ID="lblCondition" runat="server" Text="Condition " ForeColor="Black" Font-Bold="True" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <td style="width: 150px; height: 21px;">
                            <asp:Label ID="lblValue" runat="server" Text="Value" ForeColor="Black" Font-Bold="True" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <td></td>
                    </tr>
                    <tr valign="middle">
                        <td style="width: 150px; height:auto">
                            <asp:DropDownList ID="cmdColumn_Name" runat="server" onchange="javascript:setColValuesFromAjax(this);" CssClass="controlFont" Width="150px"></asp:DropDownList>
                        </td>
                        <td style="width: 150px; height:auto">
                            <asp:DropDownList ID="cmbCondition" runat="server" CssClass="controlFont" Width="150px" onchange="javascript:ConditionCheck(this);"></asp:DropDownList>
                        </td>
                        <td style="width: 150px; height:auto">
                            <asp:TextBox ID="txtValue" runat="server" CssClass="controlFont controlWidth ui-autocomplete-input" Width="150px"></asp:TextBox>
                            <%-- <asp:DropDownList ID="cmbValue" runat="server" CssClass="controlFont" Width="150px">
                            </asp:DropDownList> --%>
                        </td>
                        <td style="width: 65px; height:auto" align="right">
                            <%-- <img id="imgLoad" src="Images/load.gif" alt="Loding" style="display:none;" /> --%>
                            <asp:Button ID="btAdd" runat="server" Text="Add" CssClass="controlFont" OnClientClick="javascript:AddToGrid(); return false;" />
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td>
                            <div id="divFilterExp"></div>
                        </td>
                    </tr>
                    <tr style="width: 50px">
                        <td>
                            <asp:HiddenField ID="hfFilterTable" runat="server" />
                            <asp:HiddenField ID="hfFilterGroup" runat="server" />
                            <asp:HiddenField ID="hfAutoCompleteText" runat="server" />
                            <asp:HiddenField ID="hfAutoCompleteValue" runat="server" />
                            <asp:HiddenField ID="hfAjaxList" runat="server" />
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="Report Grouping">
                <table style="width: 100%" border="0" id="table_group_hdr">
                    <tr>
                    </tr>
                    <tr style="width: 50px">
                        <td style="width: 1px">
                        </td>
                        <td>
                            <asp:Label ID="Label13" runat="server" Font-Bold="True" CssClass="defaultFont" Font-Size="10pt"
                                Text="Step 4: Grouping Data"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table style="width: 100%" id="table_group" border="0">
                    <tr>
                        <td style="width: 3px;">
                        </td>
                        <td>
                            <asp:PlaceHolder ID="PlaceHolder_group" runat="server"></asp:PlaceHolder>
                            <asp:Label ID="lblMsgStep2" runat="server" CssClass="defaultFont" Font-Size="8pt" Visible="False"></asp:Label>
                        </td>
                        <td style="width: 40px;">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 3px;">
                        </td>
                        <td style="width:100%;" class="pgForm_titleRight" align="right">
                            <asp:Label ID="lblAddGrouping" runat="server" Text="Add more Grouping" CssClass="controlLabelFont"></asp:Label>
                            <asp:Button ID="btnAddGrouping" Font-Bold="True" runat="server" CssClass="controlLabelFont" OnClick="btnAddGrouping_click" Text="&nbsp;+&nbsp;" />
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 3px;">
                        </td>
                        <td>
                        <table border="2" cellpadding="1" cellspacing="1" id="tblSortGrand" style="width: 100%; display: none;">
                        <tr>
                            <td align="right" style="width: 150px">
                                <asp:Label ID="lblSortDetails" runat="server" Text="Sort Details by" CssClass="controlLabelFont" ForeColor="ControlText"></asp:Label>
                            </td>
                            <td style="width:150px">
                                <asp:DropDownList ID="ddl_sort_details" runat="server" Font-Size="11px" CssClass="defaultFont" Width="150px">
                                </asp:DropDownList>
                            </td>
                            <td style="width:190px; white-space:nowrap">
                                <asp:Label ID="lblIn" runat="server" Text="&nbsp;In" CssClass="defaultFont" Font-Size="11px" Width="20px"></asp:Label>
                                <asp:DropDownList ID="ddl_sort_order" runat="server" CssClass="defaultFont" Font-Size="11px" Width="90px">
                                <asp:ListItem Text="Ascending" Value="Ascending"></asp:ListItem>
                                <asp:ListItem Text="Descending" Value="Descending"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:Label ID="lblSortOrder" runat="server" Text="&nbsp;Order" CssClass="defaultFont" Font-Size="11px" Width="70px"></asp:Label>
                            </td>
                            <td></td>
                        </tr>
                        </table>
                        <table style="width:100%;" cellpadding="0" cellspacing="0">
                        <tr>
                        <td style="height: 20px; width:100%;" class="pgForm_title">
                        <asp:Label ID="lblGrandHdr" runat="server" Text="Grand Total" ForeColor="white" ></asp:Label>
                        </td>
                        </tr>
                        </table>
                        <table>
                        <tr>
                            <td align="right" style="width: 150px">
                                <asp:Label ID="lblGrandTotal" runat="server" Text="Grand Total" CssClass="controlLabelFont" ForeColor="ControlText"></asp:Label>
                            </td>
                            <td style="width:150px">
                                <asp:DropDownList ID="ddl_grtot_field1" runat="server" Font-Size="11px" CssClass="defaultFont" Width="150px">
                                </asp:DropDownList>
                            </td>
                            <td align="right" style="white-space:nowrap;">
                                <asp:Label ID="lblGTField2" runat="server" Text="Field 2" CssClass="defaultFont" Font-Size="11px" Width="35px"></asp:Label>
                                <asp:DropDownList ID="ddl_grtot_field2" runat="server" CssClass="defaultFont" Font-Size="11px" Width="150px">
                                </asp:DropDownList>
                            </td>
                            <td align="right" style="white-space:nowrap;">
                                <asp:Label ID="lblGTField3" runat="server" Text="Field 3" CssClass="defaultFont" Font-Size="11px" Width="35px"></asp:Label>
                                <asp:DropDownList ID="ddl_grtot_field3" runat="server" CssClass="defaultFont" Font-Size="11px" Width="150px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        </table>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 3px; ">
                        </td>
                        <td>
                            <asp:HiddenField ID="hiddenGroupCnt" runat="server" Value="1" Visible="False" />
                            <asp:Label ID="lblGroupMsg" runat="server" EnableViewState="False" CssClass="defaultFont"
                                Font-Size="8pt" ForeColor="Red" Width="552px"></asp:Label>
                        </td>
                        <td style="width: 40px;">
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="Report Details">
            <%--<script language="javascript" src="scripts/commonscript.js" type="text/javascript"></script>--%>
                <table style="width: 100%" border="0">
                    <tr style="width: 50px">
                        <td style="width: 1px">
                        </td>
                        <td>
                            <asp:Label ID="lblRepDetailsHeading" runat="server" Font-Bold="True" CssClass="defaultFont"
                                Font-Size="10pt" Text="Step 5: Header/Footer Information"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 11px; width: 1px;">
                        </td>
                        <td style="height: 11px">
                            </td>
                    </tr>
                </table>
                <table style=" height: 70%" border="0">
                    <tr>
                        <td>
                        </td>
                        <td style="width: 90px;" align="right">
                            <asp:Label ID="lblRepTitle" runat="server" ForeColor="Black"  
                                Text="Report Title" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <td style="width: 300px;">
                            <asp:TextBox ID="txtRepTitle" runat="server" Width="300px" CssClass="controlFont" TabIndex="1"></asp:TextBox>
                        </td>
                        <td style="width: 18px;">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td style="width: 90px;" align="right">
                            <asp:Label ID="lblHeaderText" runat="server" ForeColor="Black"
                                Text="Header Text" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <!--  <td style="width: 9px"></td> -->
                        <td style="width: 300px;">
                            <asp:TextBox ID="txtHeaderText" runat="server" Width="300px"
                                TabIndex="2" CssClass="controlFont"></asp:TextBox>
                        </td>
                        <td style="height: 26px;">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td style="width: 90px;" align="right">
                            <asp:Label ID="lblFooterText" runat="server" CssClass="controlLabelFont" 
                                Font-Size="8pt" ForeColor="Black" Text="Footer Text"></asp:Label>
                        </td>
                        <td style="width: 300px;">
                            <asp:TextBox ID="txtFooterText" runat="server" 
                                CssClass="controlFont" TabIndex="3" Width="300px"></asp:TextBox>
                        </td>
                        <td style="width: 18px; height: 22px;">
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 26px;"> </td>
                        <td style="width: 90px; height: 22px"> </td>                        
                        <td runat="server" style="width: 300px; height: 4px;" id="Td1">
                            <asp:CheckBox ID="chkDisplayLogo" runat="server" CssClass="controlFont" Text="Display Logo (in Header only)" TabIndex="4" />
                        </td>
                   </tr>
                   <tr>
                        <td style="height: 26px;"> </td>
                        <td style="width: 90px; height: 22px"> </td>                        
                        <td runat="server" style="width: 300px; height: 4px;" id="Td2">
                            <asp:CheckBox ID="chkDisplayDate" runat="server" CssClass="controlFont" Text="Display Date (in Footer only)" TabIndex="5" />
                        </td>
                   </tr>
                   <tr>
                        <td style="height: 26px;"> </td>
                        <td style="width: 90px; height: 22px"> </td>
                        <td runat="server" style="width: 300px; height: 4px;" id="Td3">
                            <asp:CheckBox ID="chkDisplayPageNum" runat="server" CssClass="controlFont" Text="Display Page Number (in Footer only)" TabIndex="6" />
                        </td>
                   </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="Save Report">
                <table border="0" cellpadding="1" cellspacing="1">
                    <tr>
                        <td style="width: 1px; height: 20px">
                        </td>
                        <td colspan="2" style="height: 20px">
                            <asp:Label ID="lblSaveReport" runat="server" Font-Bold="True" 
                                Font-Size="10pt" Text="Step 6: Saving Report"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 1px; height: 20px">
                        </td>
                        <td style="width: 90px; height: 20px" align="right">
                            <asp:Label ID="lblRepName" runat="server" CssClass="controlLabelFont" 
                                Font-Size="8pt" ForeColor="Black" Text="Report Name"></asp:Label>
                        </td>
                        <td style="width: 164px; height: 20px">
                            <asp:TextBox ID="txtRepName" runat="server" CssClass="controlFont" Width="244px" TabIndex="1" MaxLength="50"></asp:TextBox>
                        </td>
                        <td><asp:RequiredFieldValidator ID="rqdReportName" runat="server" ControlToValidate="txtRepName"
                                Width="218px" Height="15px" Display="Dynamic" SetFocusOnError="True" Font-Size="8pt">Please enter a name for the report</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td style="width: 1px; height: 20px">
                        </td>
                        <td style="width: 90px; height: 20px" align="right" valign="top">
                            <asp:Label ID="lblRepDesc" runat="server" ForeColor="Black"
                                Text="Report Description" CssClass="controlLabelFont" Font-Size="8pt"></asp:Label>
                        </td>
                        <td style="width: 164px; height: 20px">
                            <asp:TextBox ID="txtReportDesc" runat="server"
                                Height="65px" TextMode="MultiLine" Width="244px" TabIndex="2" CssClass="controlFont"></asp:TextBox>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style="width: 1px; height: 20px">
                        </td>
                        <td style="width: 90px; height: 20px" align="right">
                            <asp:Label ID="lblCategory" runat="server" Text="Category" CssClass="controlLabelFont" ForeColor="Black" Width="107px"></asp:Label>
                        </td>
                        <td style="width: 164px; height: 20px">
                            <asp:TextBox ID="txtReportCategory" runat="server" CssClass="defaultFont" Font-Size="8pt"
                                            Width="244px"></asp:TextBox>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style="width: 1px; height: 20px">
                        </td>
                        <td style="width: 90px; height: 20px" align="right">
                            <asp:Label ID="lblOwner_step5" runat="server" Text="Owner" CssClass="controlLabelFont"></asp:Label>
                        </td>
                        <td style="width: 164px; height: 20px">
                            <asp:TextBox ID="txt_owner_id" runat="server" CssClass="controlFont" TabIndex="3"></asp:TextBox>
                            <asp:HiddenField ID="owner_id" runat="server" />
                            <asp:Image ID="imgsearch" ToolTip="Click here for Lookup Window" runat="server" ImageUrl="~/Images/search.gif" CssClass="SearchPopup" />
                            &nbsp;                            
                        </td>
                        <td></td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="View Report" StepType="Finish">
                <table style="width: 100%" id="tblDisplayReport">                    
                    <tr><td><asp:Label ID="lbl_ReportName" runat="server" Font-Bold="True" Font-Size="9pt" Text=""></asp:Label></td></tr>
                    <tr style="font-size: 8pt; white-space:nowrap;" class="defaultFont">
                        <td style="white-space:nowrap;">
                        <table id="tblParam" runat="server" visible="false" style="margin: 0 auto 0 auto;border:solid 1px #CECECE;"></table>
                        </td>
                        </tr>
                     <tr style="height: 5px"><td></td></tr>
                     <tr>
                        <td>
                        <asp:Label runat="server" CssClass="controlLabelFont" ID="lblExport" Text="Export format"></asp:Label>
                        <asp:DropDownList runat="server" CssClass="controlLabelFont" ID="ddlExport">
                        <asp:ListItem Value="Excel">Excel</asp:ListItem>
                        <asp:ListItem Value="PDF">PDF</asp:ListItem>
                        </asp:DropDownList>
                        <asp:LinkButton runat="server" ID="lnkExport" CssClass="controlLabelFont" Text="Export" OnClick="lnkExport_Click"></asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lnkPrint" CssClass="controlLabelFont" Text="Print" OnClick="lnkPrint_Click" Visible="False"></asp:LinkButton>
                        </td>
                    </tr>
                    <tr><td style="height: 3px"></td></tr>
                    <tr>
                        <td id="tdReportViewer" style="height: 5px">
                            <rsweb:ReportViewer ID="reportViewer" Visible="true" runat="server" Height="247px" Width="400px" AsyncRendering="False" SizeToReportContent="True" DocumentMapWidth="" InternalBorderStyle="NotSet" InternalBorderWidth="" ShowExportControls="False" ShowRefreshButton="False" ShowPrintButton="false" >
                            </rsweb:ReportViewer>
                        </td>
                    </tr>
                </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ProviderName="System.Data.SqlClient">
                </asp:SqlDataSource>
                <asp:ImageButton ID="imgNewWindow" runat="server" ImageUrl="Images/newWindow21.gif"
                    ToolTip="View report in a new window" OnClick="imgNewWindow_Click" CausesValidation="False"
                    Visible="False" />
                <asp:HiddenField ID="hfRName" runat="server" />
                &nbsp; &nbsp;
            </asp:WizardStep>
        </WizardSteps>
        <StepStyle VerticalAlign="Top" />
        <HeaderStyle CssClass="Grid_Header" Height="25px" HorizontalAlign="Left" />
        <NavigationStyle CssClass="displaygridbottom" Height="30px" />
        <StartNavigationTemplate>
            &nbsp;<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel" CssClass="buttonCss" />&nbsp;
            <asp:Button ID="btnPrev_dummy" runat="server" Enabled="False" Text="Previous" CssClass="buttonCss" />&nbsp;
            <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" OnClientClick="javascript:return validateFields();" CssClass="buttonCss" />&nbsp;
            <asp:Button ID="btnPreview" runat="server" Text="Preview" OnClick="btnPreview_Click" OnClientClick="javascript:return validateFields();" CssClass="buttonCss" />&nbsp;
            <asp:ImageButton ID="btnExport" runat="server" ImageAlign="Top" ImageUrl="~/Images/export-dd-left.gif" OnClientClick="javascript:return validateFields();" OnClick="btnExport_Click" /><asp:ImageButton ID="btnExport_menu" runat="server" ImageAlign="Top" ImageUrl="~/Images/save-report-dd-right.gif" />&nbsp;
            <asp:ImageButton ID="btnSaveRep_start" runat="server" ImageUrl="~/Images/save-report-dd-left.gif" ImageAlign="Top" OnClick="btnSaveRep_start_Click" OnClientClick="javascript:return validateFields();" /><asp:ImageButton ID="btnSaveRep_menu" runat="server" ImageUrl="~/Images/save-report-dd-right.gif" ImageAlign="Top" />
            <cc1:HoverMenuExtender ID="rptHoverMenuExtender" runat="server" PopupControlID="divOptions" TargetControlID="btnSaveRep_menu" PopupPosition="Bottom" OffsetX="-110">
            </cc1:HoverMenuExtender>            
            <div id="divOptions">            
                <asp:Menu ID="mnuOptions" runat="server" Height="62px" Width="140px" BorderWidth="1px" EnableTheming="True" Font-Bold="False" CssClass="defaultFont" Font-Size="11px" BackColor="white" BorderColor="#535758" OnMenuItemClick="mnuOptions_MenuItemClick" BorderStyle="Solid">
                <statichoverstyle Cssclass="menudynamichoverstyle"/>
                    <Items>
                        <asp:MenuItem Text="Save" Value="Save"></asp:MenuItem>
                        <asp:MenuItem Text="Save As" Value="Save As"></asp:MenuItem>
                        <asp:MenuItem Text="Save & Preview" Value="Save & Preview"></asp:MenuItem>
                        <asp:MenuItem Text="Save & Export" Value="Save & Export"></asp:MenuItem>
                        <asp:MenuItem Text="Save & Close" Value="Save & Close"></asp:MenuItem>
                    </Items>
                </asp:Menu>
                &nbsp;</div>
            <cc1:HoverMenuExtender ID="exportHoverMenuExtender" runat="server" PopupControlID="divExportoptions"
                PopupPosition="Bottom" TargetControlID="btnExport_menu" OffsetX="-50">
            </cc1:HoverMenuExtender>
            <div id="divExportoptions">
                <asp:Menu ID="mnuExportoptions" runat="server" BackColor="White" BorderColor="#535758" Width="140px" BorderWidth="1px" EnableTheming="True" Font-Bold="False" CssClass="defaultFont" Font-Size="11px" OnMenuItemClick="mnuExportoptions_MenuItemClick">
                <statichoverstyle Cssclass="menudynamichoverstyle"/>
                    <Items>
                        <asp:MenuItem Text="Excel" Value="XLS"></asp:MenuItem>
                        <asp:MenuItem Text="PDF" Value="PDF"></asp:MenuItem>
                    </Items>
                </asp:Menu>
            </div>
            <%--<br />--%>
        </StartNavigationTemplate>
        <StepNavigationTemplate>
            <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel" CssClass="buttonCss" />&nbsp;
            <asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                Text="Previous" CssClass="buttonCss" />&nbsp;
            <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="Next" OnClientClick="javascript:return validateStep3Fields();" CssClass="buttonCss" />
            <asp:Button ID="btnFinish" runat="server" OnClick="btnFinish_Click" Text="Finish" Visible="False" CssClass="buttonCss" />&nbsp;<asp:Button
                ID="btnPreview_step" runat="server" Text="Preview" OnClick="btnPreview_Click" OnClientClick="javascript:return validateStep3Fields();" CssClass="buttonCss" />&nbsp;
            <asp:ImageButton ID="btnExport" runat="server" ImageAlign="Top" ImageUrl="~/Images/export-dd-left.gif" OnClientClick="javascript:return validateFields();" OnClick="btnExport_Click" /><asp:ImageButton ID="btnExport_menu" runat="server" ImageAlign="Top" ImageUrl="~/Images/save-report-dd-right.gif" />&nbsp;
            <asp:ImageButton ID="btnSaveRep_step" runat="server"
                    ImageAlign="Top" ImageUrl="~/Images/save-report-dd-left.gif" OnClick="btnSaveRep_step_Click" OnClientClick="javascript:return validateStep3Fields();return validateFields();"/><asp:ImageButton
                        ID="btnSaveRep_step_menu" runat="server" ImageAlign="Top" ImageUrl="~/Images/save-report-dd-right.gif"/><br />
            <cc1:HoverMenuExtender ID="HoverMenuExtender_Step2" runat="server" TargetControlID="btnSaveRep_step_menu" PopupControlID="div_Options_step2" PopupPosition="Bottom" OffsetX="-110">
            </cc1:HoverMenuExtender>
            <div id="div_Options_step2">
                <asp:Menu ID="mnu_options_step2" runat="server" Height="62px" Width="130px" BorderWidth="1px" EnableTheming="True" Font-Bold="False" CssClass="defaultFont" Font-Size="11px" BackColor="white" BorderColor="#535758" OnMenuItemClick="mnuOptions_MenuItemClick" >
                <statichoverstyle Cssclass="menudynamichoverstyle"/>
                    <Items>
                        <asp:MenuItem Text="Save" Value="Save"></asp:MenuItem>
                        <asp:MenuItem Text="Save As" Value="Save As"></asp:MenuItem>
                        <asp:MenuItem Text="Save &amp; Preview" Value="Save &amp; Preview"></asp:MenuItem>
                        <asp:MenuItem Text="Save &amp; Export" Value="Save &amp; Export"></asp:MenuItem>
                        <asp:MenuItem Text="Save &amp; Close" Value="Save &amp; Close"></asp:MenuItem>
                    </Items>
                </asp:Menu>
            </div>
            <cc1:HoverMenuExtender ID="exportHoverMenuExtender" runat="server" PopupControlID="divExportoptions"
                PopupPosition="Bottom" TargetControlID="btnExport_menu" OffsetX="-50">
            </cc1:HoverMenuExtender>
            <div id="divExportoptions">
                <asp:Menu ID="mnuExportoptions" runat="server" BackColor="White" BorderColor="#535758" Width="140px" BorderWidth="1px" EnableTheming="True" Font-Bold="False" CssClass="defaultFont" Font-Size="11px" OnMenuItemClick="mnuExportoptions_MenuItemClick">
                <statichoverstyle Cssclass="menudynamichoverstyle"/>
                    <Items>
                        <asp:MenuItem Text="Excel" Value="XLS"></asp:MenuItem>
                        <asp:MenuItem Text="PDF" Value="PDF"></asp:MenuItem>
                    </Items>
                </asp:Menu>
            </div>
        </StepNavigationTemplate>
        <FinishNavigationTemplate>
            <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel" CssClass="buttonCss" />
            &nbsp;&nbsp;
            <asp:Button ID="FinishPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                Text="Previous" CssClass="buttonCss" />
            <asp:Button ID="FinishButton" runat="server" CommandName="MoveComplete" Text="Finish" CssClass="buttonCss" />
        </FinishNavigationTemplate>
        <HeaderTemplate>
            <table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="center" class="pgForm_Title" colspan="1" style="width: 100%; height: 30px"
                        valign="middle">
                        <asp:Label ID="Label3" runat="server" Text="Report Wizard - Add"></asp:Label></td>
                    <td class="pgForm_Title" style="width: 25px; height: 30px">
                        <asp:ImageButton ID="imgNewWindow1" Visible="false" runat="server" ImageUrl="Images/newWindow21.gif"
                            ToolTip="View report in a new window" OnClick="imgNewWindow_Click" CausesValidation="False" />&nbsp;</td>
                </tr>
            </table>
        </HeaderTemplate>
    </asp:Wizard>
    <asp:HiddenField ID="hf_af_row_id1" runat="server" />
    &nbsp;
</asp:Content>
